<script>
	import Vue from 'vue'
	export default {
		onLaunch: function() {
			console.log("access_token===" + uni.getStorageSync('access_token'))
			if (!uni.getStorageSync('access_token')) {
				console.log("access_token为空" + uni.getStorageSync('access_token'))
				uni.reLaunch({
					url: '/pages/login/index'
				})
			}
			uni.getSystemInfo({
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif
					// #ifdef MP-WEIXIN
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
					// #endif       
					// #ifdef MP-ALIPAY
					Vue.prototype.StatusBar = e.statusBarHeight;
					Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
					// #endif
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "./components/colorui/main.css";
	@import "./components/colorui/icon.css";

	page {
		background-color: #efefef;
	}

	.hx-overflow-1 {
		display: -webkit-box; //谷歌
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1; //显示几行
		overflow: hidden;
	}

	.hx-overflow-2 {
		display: -webkit-box; //谷歌
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2; //显示几行
		overflow: hidden;
	}
	.fixed {
		position: fixed;
		z-index: 99;
		width: 100%;
	}
</style>
